package com.szcinda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface OrderFeeRepository extends JpaRepository<OrderFee, String>, JpaSpecificationExecutor<OrderFee> {
    List<OrderFee> findByOrderId(String orderId);
    List<OrderFee> findByOrderIdAndType(String orderId, String type);

    OrderFee findById(String id);

    void deleteByOrderId(String orderId);

    void deleteByOrderIdAndType(String orderId, String type);

    List<OrderFee> findByOrderIdIn(List<String> orderIds);
    List<OrderFee> findByOrderIdInAndType(List<String> orderIds, String type);
}
